package com.jbit.hxy.model.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

@Getter
@Setter
@NoArgsConstructor
public class RegisterUserDTO {

    @NotBlank(message = "请输入手机号")
    @Pattern(regexp = "1[3456789]\\d{9}",message = "手机号码格式不正确，请重新输入")
    private String phoneNumber;

    @NotBlank(message = "请输入密码")
    @Size(min = 6, message = "密码长度至少为6位字符")
    private String password;

    @NotBlank(message = "请输入确认密码")
    @Size(min = 6, message = "确认密码长度至少为6位字符")
    private String confirmPassword;

    @NotBlank(message = "请输入验证码")
    private String code;
}
